package com.base.pig.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.sql.Timestamp;

/**
 * @ProjectName
 * @Package com.pig4cloud.pig.lab.entity
 * @ClassName ScAlarmRoleManager
 * @Description 报警规则表
 * @Company lab
 * @Author wangw
 * @Date 2020/4/29 0029 17:06
 * @UpdateUser
 * @UpdateDate
 * @UpdateRemark
 * @Version 1.0.0
 */
@Data
@JsonInclude
@TableName(value = "sc_alarm_rule")
public class ScAlarmRule {

  private static final long serialVersionUID = 1L;

  /** 
   * @Title 主键ID
   * @Description
   * @return
   * @author wangw
   * @date  
  */
  @TableId(type = IdType.ASSIGN_ID)
  @JsonSerialize(using= ToStringSerializer.class)
  private Long alarmId;

  /**
   * @Title
   * @Description 设备类型
   * @return
   * @author wangw
   * @date
  */
  @NotEmpty
  @NotBlank(message = "设备类型不能为空.")
  private String deviceType;

  /**
   * @Title
   * @Description 设备名称
   * @return
   * @author wangw
   * @date
   */
  @NotEmpty
  @NotBlank(message = "设备名称不能为空.")
  private String  deviceTypeName;

  /**
   * @Title
   * @Description SN码
   * @return
   * @author wangw
   * @date
   */
  @NotEmpty
  @NotBlank(message = "设备编号不能为空.")
  private String sn;

  /**
   * @Title
   * @Description 字段名称
   * @return
   * @author wangw
   * @date
   */
  private String fieldsName;

  /**
   * @Title
   * @Description 字段值
   * @return
   * @author wangw
   * @date
   */
  private String fieldsValue;

  /**
   * @Title
   * @Description 上限
   * @return
   * @author wangw
   * @date
   */
  private String  upperLimit;

  /**
   * @Title
   * @Description 下限
   * @return
   * @author wangw
   * @date
   */
  private String lowerLimit;

  /**
   * @Title
   * @Description 突变范围
   * @return
   * @author wangw
   * @date
   */
  private String ranges;

  /**
   * @Title
   * @Description 超时范围
   * @return
   * @author wangw
   * @date
   */
 private String timeout;

  /**
   * @Title
   * @Description 创建时间
   * @return
   * @author wangw
   * @date
   */
  private Timestamp gmtCreate;

  /**
   * @Title
   * @Description 更新时间
   * @return
   * @author wangw
   * @date
   */
  private Timestamp gmtModified;

}
